package com.idTech;

import scala.languageFeature;

import com.idTech.blocks.GenericBlock;
import com.idTech.blocks.TomatoCrop;
import com.idTech.items.EnemySpawnWand;
import com.idTech.items.GenericItem;
import com.idTech.items.SuperItemExpBottle;
import com.idTech.items.TomatoFruitGold;
import com.idTech.items.TomatoSeeds;
import com.idTech.utils.survivalUtils;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.ForgeHooks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.stats.Achievement;

@Mod(modid = "iDTechModBase", name = "iDTechModBase", version = "0.0.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class iDTechModBase 
{
	
	@Instance("iDTechModBase")
	public static iDTechModBase instance;
	
	@SidedProxy(clientSide="com.idTech.ClientProxy", serverSide="com.idTech.CommonProxy")
	public static CommonProxy proxy;
	public final static Item genericItem = new GenericItem(5000);

	public final static Block tomatoCrop = new TomatoCrop(502).setUnlocalizedName("TomatoCrop");
	public final static ItemSeeds tomatoSeeds = (ItemSeeds)new TomatoSeeds(5003, tomatoCrop.blockID, Block.tilledField.blockID).setUnlocalizedName("seeds.tomato");
	public final static Item tomatoFruit = new TomatoFruitGold(5004, 4, 1.2f, false).setAlwaysEdible().setPotionEffect(Potion.regeneration.id, 5, 0, 1.0F).setUnlocalizedName("tomatoFruitGold");
	public final static Item superExpBottle = new SuperItemExpBottle(5005).setUnlocalizedName("superExpBottle");
	public final static Item genericIngot = new GenericItem(5006).setMaxStackSize(16).setCreativeTab(CreativeTabs.tabMisc).setUnlocalizedName("genericIngot");
	public final static Item enemySpawnWand = (Item)new EnemySpawnWand(5007).setMaxStackSize(16).setCreativeTab(CreativeTabs.tabMisc).setUnlocalizedName("enemySpawnWand");
	//Achievement a1 = new Achievement(par1, par2Str, par3, par4, par5Block, par6Achievement)
	public final static Block myFirstBlock = (Block)(new GenericBlock(506,0).setUnlocalizedName("blockNameSecret"));
	//public final static ItemSeeds tomatoSeeds = new ItemSeeds(5002, tomatoFruit.getit, par3)
	
	
//	public final static Block genericBlock = new GenericBlock(5002, Block.anvil.);
	//public final static ItemSeeds tom atoSeeds = new ItemSeeds(5002,tomatoCrop.BlockID, Block.tilledField.blockID);
	
//	public Item tomatoFruit = new ForgeItem(5003);
	@PreInit
	public void preInit(FMLPreInitializationEvent event)
	{
	}
	@Init
	public void load(FMLInitializationEvent event)
	{
		LanguageRegistry.addName(superExpBottle, "Super Exp Bottle");
		LanguageRegistry.addName(enemySpawnWand, "Enemy Spawn Wand");
		LanguageRegistry.addName(genericIngot, "Generic Ingot");
		LanguageRegistry.addName(genericItem, "Generic Item");
		GameRegistry.registerBlock(myFirstBlock, myFirstBlock.getUnlocalizedName());
		LanguageRegistry.addName(myFirstBlock, "My First Block");
		LanguageRegistry.addName(tomatoFruit, "Tomato Fruit");
		LanguageRegistry.addName(tomatoSeeds, "Tomato Seeds");
		MinecraftForge.addGrassSeed(new ItemStack(tomatoSeeds,4), 10);
		GameRegistry.registerBlock(tomatoCrop, tomatoCrop.getUnlocalizedName());
		LanguageRegistry.addName(tomatoCrop, "Tomato Crop");
	    //	tomatoSeeds.setTextureFile(CommonProxy.Block_PNG);
		//  survivalUtils.dirtToBasics();
		//  survivalUtils.dirtToFancy();
	    //	LanguageRegistry.addName(tomatoSeeds, "Tomato Seeds");
	    //	MinecraftForge.addGrassSeed(new ItemStack(tomatoSeeds), 10);
		//  survivalUtils.dirtToDarkMagic();
		//  survivalUtils.dirtToExtraStuff();
		survivalUtils.dirtToFirstBlocks();
		
		
	}
	@PostInit 
	public void postInit(FMLPostInitializationEvent event)
	{
	}
}
